//
//  HMComposeItem.swift
//  Weibo
//
//  Created by ZhuDong on 16/5/28.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

class HMComposeItem: NSObject {
    var title: String?
    var icon: String?
    var target: String?
    init(dict: [String : AnyObject]){
        super.init()
        self.setValuesForKeysWithDictionary(dict)
    }
    class func composeItems() -> [HMComposeItem]{
        var arrM:[HMComposeItem] = [HMComposeItem]()
        let array: [[String:AnyObject]] = NSArray(contentsOfFile: NSBundle.mainBundle().pathForResource("Compose.plist", ofType: nil)!) as! [[String:AnyObject]]
        for item in array {
            let btn = HMComposeItem(dict: item)
            arrM.append(btn)
        }
        return arrM
    }
}
